// 订单
import request from '@/utils/request'
// 获取一定时间范围之内的订单总数
export const rangeOrder = (params) => {
  return request({
    url: '/api/order-service/report/orderCount',
    params
  })
}
// 获取一定时间范围之内的收入
export const income = (params) => {
  return request({
    url: '/api/order-service/report/orderAmount',
    params
  })
}
// 获取一定时间范围之内的分成总数
export const divideApi = (params) => {
  return request({
    url: '/api/order-service/report/totalBill',
    params
  })
}
// 获取一定日期范围之内的合作商分成汇总数据
export const summarizeList = (params) => {
  return request({
    url: '/api/order-service/report/partnerCollect',
    params
  })
}
// 获取售货机补货次数
export const replenishment = (innerCode, start, end) => {
  return request({
    url: `/api/task-service/task/supplyCount/${innerCode}/${start}/${end}`

  })
}
// 获取售货机维修次数
export const repairApi = (innerCode, start, end) => {
  return request({
    url: `/api/task-service/task/repairCount/${innerCode}/${start}/${end}`
  })
}
// 获取售货机商品销量
export const salesQuantity = (innerCode, start, end) => {
  return request({
    url: `/api/order-service/report/skuCollect/${innerCode}/${start}/${end}`
  })
}
// 订单搜索
export const orderSearch = (params) => {
  return request({
    url: `/api/order-service/order/search`,
    params
  })
}
